<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/layui.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/style.css" />
	<script type="text/javascript" src="__PUBLIC__/js/js.js" ></script>
    <title>巧恩教育管理系统</title>
</head>

<body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin" id="layui_main">
        <div class="layui-header">
            <div class="layui-logo">
                <img src="__PUBLIC__/images/logo.png">
            </div>
            <!-- 头部区域（可配合layui已有的水平导航） -->
            <h2 class="layui-layout-left title">巧恩教育管理系统</h2>
            <ul class="layui-nav layui-layout-right" style="height: 100px;">
                <li class="layui-nav-item" style="line-height: 100px;height: 100px;">
                    <a href="" style="margin-top: 38px;">
                        <i class="remind_icon"></i>
                        <span class="layui-badge-dot" style="line-height: 1.5;font-size: 10px;top: 46%;width: 14px;height: 14px;background-color: #fc575e;">{$count}</span>
                    </a>
                </li>
                <li class="layui-nav-item" style="line-height: 100px;">
                    <a href="" style="color: red;">
                        {$qe_user.name}
                    </a>
                    <dl class="layui-nav-child" style="top: 100px;">
                        <dd>
                            <a href="{:U('User/useredit')}">修改信息</a>
                        </dd>
                        <dd>
                            <a href="javascript:out();">退出</a>
                        </dd>
                    </dl>
                </li>
            </ul>
        </div>

        <div class="layui-side layui-bg-black">
            <div class="layui-side-scroll">
                <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
                <ul class="layui-nav layui-nav-tree" lay-filter="test">
									<li class="layui-nav-item layui-nav-itemed layui-this">
											<a href="{:U('Home/index')}" target="option">
													<img src="__PUBLIC__/images/L1.png" class="nav_list_icon"> 首页
											</a>
									</li>
									<foreach name="menu_data" item="m" key="k">
										<if condition="in_array($m['id'],$qe_user['content'])">
                    <li class="layui-nav-item">
                        <a <if condition="!empty($m['href'])">href="{:U($m['href'])}"<else/> href="javascript:;" </if>>
                           <if condition="!empty($m['img'])"><img src="{$m.img}" class="nav_list_icon"></if> {$m.name}
                        </a>
											<if condition="!empty($m['son'])">
											<dl class="layui-nav-child">
												<foreach name="m['son']" item="mm">
													<if condition="in_array($mm['id'],$qe_user['content'])">
												<dd class="layui-nav-item">
													<a <if condition="!empty($mm['href'])">href="{:U($mm['href'])}"<else/> href="javascript:;" </if> target="option">
														<span class="list2_icon"></span>
														{$mm.name}
													</a>
													<if condition="!empty($mm['son'])">
													<dl class="layui-nav-child">
														<foreach name="mm['son']" item="mmm">
														<dd>
															<a <if condition="!empty($mmm['href'])">href="{:U($mmm['href'])}"<else/> href="javascript:;" </if>  target="option">
																<span class="list3_icon"></span>
																{$mmm.name}
															</a>
															<if condition="!empty($mmm['son'])">
																<dl class="layui-nav-child" style="box-sizing: border-box;padding-left: 175px;">
																	<volist name="mmm['son']" id="vo">
																		<dd>
																			<a <if condition="!empty($vo['href'])">href="{:U($vo['href'])}"<else/> href="javascript:;" </if>  target="option">
																				{$vo.name}
																			</a>
																			</dd>
																	</volist>
																</dl>
															</if>
														</dd>
														</foreach>
													</dl>
													</if>
												</dd>
												</if>
												</foreach>
											</if>
                    </li>
										</if>
									</foreach>
                </ul>
                <div class="date_con">
                    <span id="time_day">{$time}</span>
                    <span id="time_week">今天是{$week}</span>
                </div>
            </div>
        </div>

        <div class="layui-body" style="overflow-y: hidden;">
            <!-- 内容主体区域 -->
            <iframe class="showIndex" id="option" name="option" width="100%" height="100%" frameborder="0" src="{:U('Home/index')}" scrolling="auto"
                seamless="seamless"></iframe>
        </div>
		<!-- 底部固定区域 -->
        <!--<div class="layui-footer">
            
            © 巧恩.com - 底部固定区域
        </div>-->
    </div>

    <script src="__PUBLIC__/js/layui.all.js" type="text/javascript" charset="utf-8"></script>
    <script>
			function  out(){
				window.location.href="{:U('User/logOut')}";
			}
        //一般直接写在一个js文件中
        layui.use(['layer', 'form'], function () {
            var $=layui.jquery,
			layer = layui.layer,
            form = layui.form;

            // layer.msg('Hello World');
			$('.layui-nav-item').on('click',function(){
				if ($(this).hasClass("layui-nav-itemed")) {
					$(this).siblings().removeClass('layui-nav-itemed')
					$(this).siblings().removeClass('layui-this')
				}else if($(this).hasClass("layui-this")){
					$(this).siblings().removeClass('layui-nav-itemed')
					$(this).siblings().removeClass('layui-this')
				}
			})
			
        });
    </script>
</body>

</html>
